package com.zhuiyun.project.api.collectVideo.mapper;

import com.zhuiyun.project.api.collectVideo.entity.CollectVideo;
import com.zhuiyun.project.api.collectVideo.entity.Favorites;
import com.zhuiyun.project.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;

/**
* @Author XC8
* @Description 收藏夹接口
* @Date 2024/3/4 8:58
* @Return
*/

@Mapper
public interface FavoritesMapper extends BaseMapper<Favorites> {
    /**
     * @Author XC8
     * @Description 根据用户id列出收藏夹
     * @Date 2024/3/4 8:58
     * @Return
     * @param userId
     */
    List<Favorites> getFavoritesById(@Param("userId") Integer userId);

    /**
    * @Author XC8
    * @Description 新增收藏夹
    * @Date 2024/3/4 14:35
    * @Return int
    */
    int addFavorite(Favorites favorites);

    /**
    * @Author XC8
    * @Description 删除收藏夹
    * @Date 2024/3/4 19:46
    * @Return int
    */
    int favoritesDelete(@Param("fId") Integer fId);
}
